// import { reactive } from 'vue'
import { io } from 'socket.io-client'

// export const state = reactive({
//   connected: false,
//   fooEvents: [],
//   barEvents: [],
// })

// "undefined" means the URL will be computed from the `window.location` object
// const URL = process.env.NODE_ENV === "production" ? undefined : "http://localhost:3000";
const URL = 'http://localhost:9000'

export const socket = io(URL, { autoConnect: false })

socket.on('connect', () => {
  console.log('connectaaaaa')
  //   state.connected = true
})

socket.on('disconnect', () => {
  //   state.connected = false
})

